home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 66 lines | [TEXT/GEOL] |
- Item 1103170 19-Aug-90 05:03PDT
-
- From: A.XSE007 Austria - Orthosoft,J Mayrbauer,IDV
-
- To: D4453 Technically Soft, Chris Lang,PRT
- MACAPP.TECH$ MacApp Technical
-
- Sub: Re[2]-Two Problems
-
- Dear Chris
-
-
- Problem One:
- You should write your own FailXXXXXX procedure. I've done this for reading in
- tiff files:
-
- {$S MAFailureRes}
- PROCEDURE FailTif(error : Integer);
- CONST
- kMsgAlert = msgAlert DIV $10000;
- TYPE
- Converter = RECORD
- CASE BOOLEAN OF
- TRUE:
- (message: LongInt);
- FALSE:
- (hiWd, loWd: INTEGER);
- END;
- VAR
- c : Converter;
- BEGIN
- IF error < noErr THEN
- BEGIN
- c.hiWd := kMsgAlert;
- CASE error OF
- TIFERR_PREEOS: c.loWd := kTifErrorAlertBase + 1;
- TIFERR_NOTTIFF: c.loWd := kTifErrorAlertBase + 2;
- TIFERR_CANTFINDIFD: c.loWd := kTifErrorAlertBase + 3;
- TIFERR_CANTFINDTAG: c.loWd := kTifErrorAlertBase + 4;
- TIFERR_NOTIMP: c.loWd := kTifErrorAlertBase + 5;
- TIFERR_SOFTWARE:c.loWd := kTifErrorAlertBase + 6;
- OTHERWISE
- c.loWd := kTifErrorAlertBase + 7;
- END;
- Failure(error, LongInt(c));
- END;
- END;
-
- You have to build your own message for the failure procedure. The high word
- must contain 'kMsgAlert' to signal Failure that you want to use your own alert.
- The low word contains the actual alert ID for your alert.
- Further information is provided by 'Error and Failure Handling' chapter 7 of
- the MacApp Cookbook.
-
-
- Problem 2:
-
- See DemoText sample.
-
-
- Kind regards
- Juergen Mayrbaeurl
- ORTHOsoft Ges.m.b.H.
- ALink: A.XSE007
-
-